load("//bazel:mongo_src_rules.bzl", "mongo_cc_benchmark", "mongo_cc_binary", "mongo_cc_library", "mongo_cc_unit_test")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

mongo_cc_library(
    name = "bson_extract",
    srcs = [
        "bson_extract.cpp",
    ],
    deps = [
        "//src/mongo:base",
    ],
)

mongo_cc_unit_test(
    name = "bson_util_test",
    srcs = [
        "bson_check_test.cpp",
        "bson_extract_test.cpp",
        "builder_test.cpp",
    ],
    tags = ["mongo_unittest_eighth_group"],
    deps = [
        ":bson_extract",
        "//src/mongo:base",
        "//src/mongo/util:safe_num",
    ],
)

mongo_cc_benchmark(
    name = "bufbuilder_bm",
    srcs = [
        "bufbuilder_bm.cpp",
    ],
    deps = [
        "//src/mongo:base",
    ],
)
